<template>
  <div class="favorate-page">
    <van-nav-bar class="page-nav-bar" title="收藏列表" left-arrow @click-left="onClickLeft" />
     <Loading v-if="isShow"></Loading>
    <HouseList :roomList="roomList"></HouseList>
  </div>
</template>

<script>
import { getCollectApi } from '@/api/my'
import HouseList from '@/components/houseList.vue'
import Loading from '@/components/loading.vue'
export default {
  props: {},
  data() {
    return {
      roomList: [],
      isShow:true
    }
  },
  computed: {},
  created() {
    this.getList()
  },
  mounted() {},
  watch: {},
  methods: {
    async getList() {
        try{
         const res= await getCollectApi()
         console.log(res);
         this.roomList=res.body
        } catch(err){
          console.log(err);
        } finally{
          this.isShow=false
        }   
    },
    onClickLeft() {
        this.$router.push('/layout/my')
    },
    goDetails(id){
       
    }
  },
  components: {
   HouseList,
   Loading
  },
}
</script>

<style scoped lang="less">
* {
  margin: 0;
  padding: 0;
}
.favorate-page {
  .page-nav-bar {
    background-color: #21b97a;
    //  font-size: 18px;
    //  height:45px
  }

}
</style>
